﻿using Hotel_Project.Bean;
using Hotel_Project.Tools.MySqlData_Helps;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Hotel_Project.HotelForm
{
    public partial class TimeGuestinfoForm : Form
    {
        public TimeGuestinfoForm()
        {
            InitializeComponent();
        }
       
        private async void button1_Click(object sender, EventArgs e)
        {
            MySqlDataTable mySqlDataTable = new MySqlDataTable();
            DataTable dt = await mySqlDataTable.GetDataTable(MySqlString.MYSQL_CONNAND, MySqlString.MYSQL_SELECT_guestinfo);
            list = MySqlGetList.GetDataList<SystemSettingsDomain>(dt);
            TimeGuestinfoFormAction times = new TimeGuestinfoFormAction();
            times.Alter(dataGridView1, list,textBox1.Text.Trim().ToString());

        }
        private List<SystemSettingsDomain> list = null;
        private async void TimeGuestinfoForm_Load(object sender, EventArgs e)
        {
            MySqlDataTable mySqlDataTable = new MySqlDataTable();
            DataTable dt = await mySqlDataTable.GetDataTable(MySqlString.MYSQL_CONNAND, MySqlString.MYSQL_SELECT_guestinfo);
            list = MySqlGetList.GetDataList<SystemSettingsDomain>(dt);
            TimeGuestinfoFormAction times = new TimeGuestinfoFormAction();
            times.Fulsh(dataGridView1, list);
        }
    }
}
